<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>产品档案查询(点击产品id进行查询信息)</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="/bootstraptable/bootstrap-table.css" rel="stylesheet">
    <style>
        #product_query_form input{
            background-color: white;
            border: none;
        }
        #product_query_form textarea{
            background-color: white;
            border: none;
        }
    </style>
</head>
<body>
<div class="container">
    <div style="width: 1200px;margin: 0 auto;">
        <h5 style="color: #3e79b6">您正在做的业务是：产品设计--产品档案管理--产品档案查询</h5>
    </div>
        <div style="text-align: right;">
            <button type="button" class="btn btn-default" onclick="history.back(-1)">返回</button>
        </div>
    <div class="col-lg-12" style="border: 1px solid lightgrey">
        <div class="row" style="border: 1px solid gainsboro;background-color: #0e9aef;">
            <div class="col-md-12 h4" style="color: white">主信息</div>
        </div>
        <div class="row">
            <form class="form-horizontal col-md-12" style="margin-top: 3px" id="product_query_form">
                <div class="form-group">
                    <label class="col-md-1 control-label" style="padding-right: 0px;">产品编号</label>
                    <div class="col-md-5" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="productId" id="productId">
                    </div>
                </div>
                <div class="form-group">
                    <label for="productName" class="col-md-1 control-label" style="padding-right: 0px;">
                        产品名称</label>
                    <div class="col-md-5" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="productName" id="productName">
                    </div>
                    <label for="factoryName" class="col-md-1 control-label" style="padding-right: 0px">制造商</label>
                    <div class="col-md-5" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="factoryName" id="factoryName" >
                    </div>
                </div>
                <div class="form-group">
                    <label for="firstKindName" class="col-md-1 control-label" style="padding-right: 0px;">
                        I级分类</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly id="firstKindName" class="form-control">
                    </div>
                    <label for="secondKindName" class="col-md-2 control-label" style="padding-right: 0px;">
                        II级分类</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly id="secondKindName" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label for="thirdKindName" class="col-md-1 control-label" style="padding-right: 0px;">
                        III级分类</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly id="thirdKindName" class="form-control">
                    </div>
                    <label for="productNick" class="col-md-2 control-label" style="padding-right: 0px">产品简称</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" class="form-control" readonly name="productNick" id="productNick">
                    </div>
                </div>
                <div class="form-group">
                    <label for="type" class="col-md-1 control-label" style="padding-right: 0px">用途类型</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly id="type" class="form-control">
                    </div>
                    <label for="productClass" class="col-md-2 control-label" style="padding-right: 0px">档次级别</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly id="productClass" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                    <label for="personalUnit" class="col-md-1 control-label" style="padding-right: 0px">计量单位</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="personalUnit" id="personalUnit">
                    </div>
                    <label for="personalValue" class="col-md-2 control-label" style="padding-right: 0px">计量值</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="personalValue" id="personalValue" >
                    </div>
                </div>
                <div class="form-group">
                    <label for="listPrice" class="col-md-1 control-label" style="padding-right: 0px;">
                        市场单价(元)</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="listPrice" id="listPrice">
                    </div>
                    <label for="costPrice" class="col-md-2 control-label" style="padding-right: 0px;">
                        计划成本单价</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="costPrice" id="costPrice" >
                    </div>
                </div>
                <div class="form-group">
                    <label for="realCostPrice" class="col-md-1 control-label" style="padding-right: 0px;">
                        成本单价</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="realCostPrice" id="realCostPrice">
                    </div>
                </div>
                <div class="row" style="border: 1px solid gainsboro;background-color: #0e9aef;">
                    <div class="col-md-12 h4" style="color: white">辅助信息</div>
                </div>
                <div class="form-group" style="margin-top: 3px;">
                    <label for="warranty" class="col-md-1 control-label" style="padding-right: 0px;">保修期</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="warranty" id="warranty">
                    </div>
                    <label for="twinName" class="col-md-2 control-label" style="padding-right: 0px;">替代品名称</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="twinName" id="twinName" >
                    </div>
                </div>
                <div class="form-group">
                    <label for="twinId" class="col-md-1 control-label" style="padding-right: 0px;">替代品编号</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="twinId" id="twinId" >
                    </div>
                    <label for="lifecycle" class="col-md-2 control-label" style="padding-right: 0px;">生命周期(年)</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="lifecycle" id="lifecycle">
                    </div>
                </div>
                <div class="form-group">
                    <label for="amountUnit" class="col-md-1 control-label" style="padding-right: 0px;">单位</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="amountUnit" id="amountUnit">
                    </div>
                </div>
                <div class="form-group">
                    <label for="providerGroup" class="col-md-1 control-label" style="padding-right: 0px;">供应商集合</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <textarea rows="3" cols="50" class="form-control" style="resize: none;" readonly name="providerGroup" id="providerGroup"></textarea>
                    </div>
                    <label for="productDescribe" class="col-md-2 control-label" style="padding-right: 0px;">产品描述</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <textarea rows="3" cols="50" class="form-control" style="resize: none;" readonly name="productDescribe" id="productDescribe"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="responsiblePerson" class="col-md-1 control-label" style="padding-right: 0px;">产品经理</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="responsiblePerson" id="responsiblePerson">
                    </div>
                    <label for="register" class="col-md-2 control-label" style="padding-right: 0px;">登记人</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="register" id="register">
                    </div>
                </div>
                <div class="form-group">
                    <label for="checker" class="col-md-1 control-label" style="padding-right: 0px;">复核人</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input type="text" readonly class="form-control" name="checker" id="checker" >
                    </div>
                    <label for="checkTime" class="col-md-2 control-label" style="padding-right: 0px;">复核时间</label>
                    <div class="col-md-4" style="padding-left: 5px">
                        <input readonly class="form-control" type="text" name="checkTime" id="checkTime" />
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="/js/hAdmin.js?v=4.1.0"></script>
<script src="/js/currentTime.js"></script>

<!-- 第三方插件 -->
<script src="/js/plugins/pace/pace.min.js"></script>

<!--BootstrapTable-->
<script src="/bootstraptable/bootstrap-table.min.js"></script>
<script src="/bootstraptable/locale/bootstrap-table-zh-CN.min.js"></script>

<script>
    $(function (){
        let pid=localStorage.getItem("pid")
        $.post("/design/file/getProductId",{"pid":pid},function (res){
            info(res)
        })
    })

    function info(res){
        $("#product_query_form #productId").val(res.productId)
        $("#product_query_form #productName").val(res.productName)
        $("#product_query_form #factoryName").val(res.factoryName)
        $("#product_query_form #firstKindName").val(res.firstKindName)
        $("#product_query_form #secondKindName").val(res.secondKindName)
        $("#product_query_form #thirdKindName").val(res.thirdKindName)
        $("#product_query_form #productNick").val(res.productNick)
        if(res.type=="Y001-1"){
            $("#product_query_form #type").val("商品")
        }else{
            $("#product_query_form #type").val("物料")
        }
        if(res.productClass=="D001-1"){
            $("#product_query_form #productClass").val("高档")
        }else if(res.productClass=="D001-2"){
            $("#product_query_form #productClass").val("中档")
        }else{
            $("#product_query_form #productClass").val("低档")
        }
        $("#product_query_form #personalUnit").val(res.personalUnit)
        $("#product_query_form #personalValue").val(res.personalValue)
        $("#product_query_form #listPrice").val(res.listPrice)
        $("#product_query_form #costPrice").val(res.costPrice)
        $("#product_query_form #realCostPrice").val(res.realCostPrice)
        $("#product_query_form #warranty").val(res.warranty)
        $("#product_query_form #twinName").val(res.twinName)
        $("#product_query_form #twinId").val(res.twinId)
        $("#product_query_form #lifecycle").val(res.lifecycle)
        $("#product_query_form #amountUnit").val(res.amountUnit)
        $("#product_query_form #providerGroup").val(res.providerGroup)
        $("#product_query_form #productDescribe").val(res.productDescribe)
        $("#product_query_form #responsiblePerson").val(res.responsiblePerson)
        $("#product_query_form #register").val(res.register)
        $("#product_query_form #checker").val(res.checker)
        $("#product_query_form #checkTime").val(add(formater(res.checkTime)))
    }
</script>
</body>
</html>